<template>
  <div class="search">
    <Row :gutter="16" class="all-height">
      <Col :span="showRight ? 18 : 24" class="all-height">
        <Card class="all-height card-child-height cheight">
          <Row class="operation code-row-bg" style="display: flex; justify-content: space-between">
            <Col span="22" style="display: flex; flex-wrap: nowrap; overflow-x: auto">
              <Button v-has="'add'" @click="add" type="primary" icon="md-add">添加</Button>
              <Button v-has="'delete'" @click="delAll" icon="md-trash">批量删除</Button>
              <Button v-has="'clear'" @click="clearData" icon="md-trash">清空数据</Button>
              <Button v-has="'output'" @click="dropExportData">导出所选数据</Button>
              <Button v-has="'output'" :loading="importing1" type="primary" @click="dropExportAll">导出全部数据</Button>
              <!--              <Button v-has="'input'" @click="beforeUploadImport">导入数据</Button>-->
              <!--              <Upload action="http://127.0.0.1:61030/xboot/dbfUploadFile">-->
              <!--                <Button icon="ios-cloud-upload-outline">Upload files</Button>-->
              <!--              </Upload>-->
              <Button @click="getDataList" icon="md-refresh">刷新</Button>

              <!--              <Button type="dashed" @click="openSearch=!openSearch">{{openSearch ? "关闭搜索" : "开启搜索"}}</Button>-->
              <Button type="dashed" @click="openTip = !openTip">{{ openTip ? '关闭提示' : '开启提示' }}</Button>
              <!--              <Upload action :before-upload="beforeUploadImport" accept=".xls, .xlsx,.dbf,.zip,.rar">-->
              <!--              <Upload action :before-upload="beforeUploadImport" accept=".xls, .xlsx,.dbf,.zip,.rar">-->
              <!--                <Button-->
              <!--                    :loading="importing"-->
              <!--                    icon="ios-cloud-upload-outline"-->
              <!--                    style="margin-right: 10px"-->
              <!--                    v-has="'input'"-->
              <!--                >导入数据-->
              <!--                </Button>-->
              <!--              </Upload>-->
              <Button type="primary" v-has="'input'" icon="ios-cloud-upload-outline" @click="importFormView = true">
                导入基础信息
              </Button>
              <Modal v-model="importFormView" title="导入基础信息">
                <Form :model="importForm" :label-width="labelWidth80">
                  <FormItem label="导入方式: ">
                    <RadioGroup v-model="importForm.importMode">
                      <Row>
                        <Radio label="1">增加记录(只增加新的记录,已存在的记录不变)</Radio>
                        <!--                                                <Radio label="4">不查重</Radio>-->
                      </Row>
                      <Row>
                        <Radio label="2">覆盖记录(只对存在的记录进行更新)</Radio>
                      </Row>
                      <Row>
                        <Radio label="3">增加+覆盖记录</Radio>
                      </Row>
                    </RadioGroup>
                  </FormItem>
                  <FormItem label="文件: ">
                    <Upload action="" accept=".xls, .xlsx,.dbf,.zip,.rar" :before-upload="handleUpload">
                      <Button icon="ios-cloud-upload-outline">点击上传</Button>
                    </Upload>
                    <div v-if="importForm.file !== null">
                      {{ importForm.file.name }}
                    </div>
                  </FormItem>
                </Form>
                <div slot="footer">
                  <Button @click="importFormcCncel">取消</Button>
                  <Button type="primary" :loading="importing" @click="importFormOk">开始上传</Button>
                </div>
              </Modal>
              <!-- 遮罩层 -->
              <!--              <div v-if="importing" class="overlay"></div>-->
              <!--              <Progress v-if="importing" :percent="importProgress" status="active" />-->
              <Button v-has="'other'" @click="downloadTemple" type="info">下载导入模板</Button>
              <!--                            <Button @click="$router.push({name:'FileUploadHistory'})">文件上传</Button>-->
            </Col>
            <Col span="2" style="text-align: right">
              <Icon
                  color="#fff"
                  class='icon01'
                  :type="showRight ? `ios-arrow-forward` : `ios-arrow-back`"
                  @click.native="clickShowRight"
              ></Icon>

              <!--              <Button :icon="showRight?`ios-arrow-forward`:`ios-arrow-back`"-->
              <!--                      @click.native="clickShowRight"-->
              <!--                      type="primary">-->
              <!--              </Button>-->
            </Col>
          </Row>
          <Row v-show="openTip">
            <Alert show-icon>
              已选择
              <span class="select-count">{{ selectList.length }}</span>
              项
              <a class="select-clear" @click="clearSelectAll">清空</a>
            </Alert>
          </Row>
          <Row class="calc-px-height">

            <div v-if="loading" class="wh-100 d-flex-around-center">
              <Spin></Spin>
            </div>
            <div v-else class="wh-100">
              <Table
                  v-if="data.length > 0"
                  border
                  :columns="columns"
                  :data="data"
                  ref="table"
                  sortable="custom"

                  @on-sort-change="changeSort"
                  @on-selection-change="changeSelect"
                  @on-row-dblclick="sjclaib"
              ></Table>
              <div v-else class="wh-100">
                <NoData class="wh-100"></NoData>
              </div>
            </div>
          </Row>
          <Row type="flex" justify="end" class="page">
            <Page
                :current="searchForm.pageNumber"
                :total="total"
                :page-size="searchForm.pageSize"
                @on-change="changePage"
                @on-page-size-change="changePageSize"
                :page-size-opts="[10, 20, 50, 100, 200]"
                size="small"
                show-total
                show-elevator
                show-sizer
            ></Page>
          </Row>
        </Card>
      </Col>
      <Col span="6" class="all-height" v-show="showRight">
        <Card class="all-height card-child-height cheight">
          <Row v-show="!modalVisible" @keydown.enter.native="handleSearch">
            <Col span="24">
              <div class="drawer-header">
                <div class="cmr16">查询区</div>
              </div>
            </Col>
            <Col span="24">
              <Form ref="searchForm" :model="queryAreaData" :label-width="labelWidth80" class="marginForm">
                <FormItem label="院校代码" prop="yxdm">
                    <Input v-model="queryAreaData.yxdm" type="text" placeholder="请输入院校代码" clearable />
                </FormItem>
                <FormItem label="院校名称" prop="yxmc">
                    <Input v-model="queryAreaData.yxmc" type="text" placeholder="请输入院校名称" clearable />
                </FormItem>
                <span v-if="drop">
                                    <FormItem label="考生号" prop="ksh">
                                        <Input v-model="queryAreaData.ksh" type="text" placeholder="请输入考生号" clearable />

                                    </FormItem>
                                    <FormItem label="学号" prop="xh">
                                        <Input v-model="queryAreaData.xh" type="text" placeholder="请输入学号" clearable />
                                    </FormItem>
                                    <FormItem label="身份证号" prop="sfzh">
                                       <Input v-model="queryAreaData.sfzh" type="text" placeholder="请输入身份证号" clearable />
                                    </FormItem>
                                    <FormItem label="姓名" prop="xm">
                                        <Input v-model="queryAreaData.xm" type="text" placeholder="请输入姓名" clearable />
                                    </FormItem>
                                </span>
                  <FormItem class="br box-key">
                  <Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
                  <Button @click="handleReset">重置</Button>
                  <!-- <a class="drop-down" @click="dropDown">
  {{ dropDownContent }}
  <Icon :type="dropDownIcon"></Icon>
  </a> -->
                </FormItem>
              </Form>
            </Col>
          </Row>
          <Row class="crow" v-show="modalVisible">
            <!-- <Col span="24"> -->
            <div class="drawer-header" style="width: 100%">
              <div class="cmr16">{{ modalTitle }}</div>
            </div>
            <!-- </Col> -->
            <!-- <Col span="24"> -->
            <Form ref="form" :model="form" :rules="formValidate" :label-width="labelWidth85" label-position="right"
                  class="marginForm">
              <FormItem prop="yxdm" label="院校名称">
                <!--                <Input v-model="form.yxdm" clearable maxlength="70"/>-->
<!--                <div class="itemLabel" slot="label" @click="clickSexCode('yxdm')" style="position: relative">-->
                  <!-- <span class="label01">院校名我称</span> -->
<!--                </div>-->
                <Select v-model="form.yxdm" filterable
                        @on-open-change="handleSelectDataSlice('yxdm', $event)" @on-change="handChange()">
                  <Option v-for="item in yxdmSelectData" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
              </FormItem>
              <FormItem label="考生号" prop="ksh">
                <Input v-model="form.ksh" clearable maxlength="70"/>
              </FormItem>
              <FormItem label="学号" prop="xh">
                <Input v-model="form.xh" clearable maxlength="70"/>
              </FormItem>
              <FormItem label="身份证号" prop="sfzh">
                <Input v-model="form.sfzh" clearable maxlength="70"/>
              </FormItem>
              <FormItem label="姓名" prop="xm">
                <Input v-model="form.xm" clearable maxlength="70"/>
              </FormItem>
              <FormItem prop="xbdm">
                <div class="itemLabel" slot="label" @click="clickSexCode('xbdm')">
                  <span>性别</span>
                </div>
                <Select v-model="form.xbdm" filterable  @on-create="keyUpSearch($event, 'xbdm')">
                  <Option v-for="item in xbList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
                <!--                <Input v-model="form.xbdm" clearable maxlength="70" @keydown.native="keyUpSearch($event,'xbdm')"/>-->
              </FormItem>
              <FormItem prop="mzdm">
                <div class="itemLabel" slot="label" @click="clickSexCode('mzdm')">
                  <span>民族</span>
                </div>
                <Select v-model="form.mzdm" filterable  @on-create="keyUpSearch($event, 'mzdm')">
                  <Option v-for="item in mzList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
                <!--                <Input v-model="form.mzdm" clearable maxlength="70" @keydown.native="keyUpSearch($event,'mzdm')"/>-->
              </FormItem>
              <FormItem prop="zzmmdm">
                <div class="itemLabel" slot="label" @click="clickSexCode('zzmmdm')">
                  <span>政治面貌</span>
                </div>
                <Select v-model="form.zzmmdm" filterable  @on-create="keyUpSearch($event, 'zzmmdm')">
                  <Option v-for="item in zzmmList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
                <!--                <Input v-model="form.zzmmdm" clearable maxlength="70" @keydown.native="keyUpSearch($event,'zzmmdm')"/>-->
              </FormItem>
              <FormItem label="城乡" prop="cx">
                <Input v-model="form.cx" clearable maxlength="70"/>
              </FormItem>
              <!--              <FormItem label="学历层次" prop="cc">-->
              <!--                <Select v-model="form.cc" placeholder="请选择" clearable style="width: 100%">-->
              <!--                  <Option :value="item.value" v-for="item in xlccDicts" :key="item.id">{{ item.title }}</Option>-->
              <!--                </Select>-->
              <!--              </FormItem>-->
              <FormItem prop="xldm">
                <div class="itemLabel" slot="label" @click="clickSexCode('xldm')">
                  <span>学历</span>
                </div>
                <Select v-model="form.xldm" filterable  @on-create="keyUpSearch($event, 'xldm')">
                  <Option v-for="item in xlList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
                <!--                <Input v-model="form.xldm" clearable maxlength="70" @keydown.native="keyUpSearch($event,'xldm')"/>-->
              </FormItem>
              <FormItem prop="zyXsz">
                <div class="itemLabel" slot="label" @click="clickSexCode('zyXsz')">
                  <span>专业</span>
                </div>
                <Select v-model="form.zyXsz" @on-open-change="handleSelectDataSlice('zyXsz', $event)" filterable
                         @on-create="keyUpSearch($event, 'zyXsz')">
                  <Option v-for="item in zyListSelectData" :value="item.value" :key="item.id">{{ item.title }}</Option>
                </Select>
              </FormItem>
              <!--              <FormItem label="专业" prop="zy">-->
              <!--                <Input v-model="form.zy" clearable maxlength="70"/>-->
              <!--              </FormItem>-->
              <FormItem label="专业方向" prop="zyfx">
                <Input v-model="form.zyfx" clearable maxlength="70"/>
              </FormItem>
              <FormItem label="分院" prop="fy">
                <Input v-model="form.fy" clearable maxlength="70"/>
              </FormItem>
              <FormItem label="院系名称" prop="xsh">
                <Input v-model="form.xsh" clearable maxlength="70"/>
              </FormItem>
              <!--              <FormItem label="院系代码" prop="xshdm">-->
              <!--                <Input v-model="form.xshdm" clearable maxlength="70"/>-->
              <!--              </FormItem>-->
              <FormItem prop="pyfsdm">
                <div class="itemLabel" slot="label" @click="clickSexCode('pyfsdm')">
                  <span>培养方式</span>
                </div>
                <Select v-model="form.pyfsdm" filterable  @on-create="keyUpSearch($event, 'pyfsdm')">
                  <Option v-for="item in pyfsList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
                <!--                <Input v-model="form.pyfsdm" clearable maxlength="70" @keydown.native="keyUpSearch($event,'pyfsdm')"/>-->
              </FormItem>
              <FormItem prop="syszddm">
                <div class="itemLabel" slot="label" @click="clickSexCode('syd_code')">
                  <span>生源所在地</span>
                </div>
                <Select v-model="form.syszddm" @on-open-change="handleSelectDataSlice('syszddm', $event)" filterable
                         @on-create="keyUpSearch($event, 'sydCode')">
                  <Option v-for="item in areaCodeListSelectData1" :value="item.value" :key="item.value">{{
                      item.title
                    }}
                  </Option>
                </Select>
              </FormItem>

              <FormItem prop="xz">
                <div class="itemLabel" slot="label" @click="clickSexCode('xz')">
                  <span>学制</span>
                </div>
                <Select v-model="form.xz" filterable  @on-create="keyUpSearch($event, 'sydCode')">
                  <Option v-for="item in xzList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
              </FormItem>
              <FormItem label="入学时间" prop="rxsj">
                <Input v-model="form.rxsj" clearable maxlength="70"/>
              </FormItem>
              <FormItem label="毕业时间" prop="bysj">
                <Input v-model="form.bysj" clearable maxlength="70"/>
              </FormItem>
              <FormItem prop="knslbdm">
                <div class="itemLabel" slot="label" @click="clickSexCode('knslbdm')">
                  <span>困难生类别</span>
                </div>
                <Select v-model="form.knslbdm" filterable  @on-create="keyUpSearch($event, 'knslbdm')">
                  <Option v-for="item in knslbList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
                <!--                <Input v-model="form.knslbdm" clearable maxlength="70" @keydown.native="keyUpSearch($event,'knslbdm')"/>-->
              </FormItem>
              <FormItem prop="sfslbdm">
                <div class="itemLabel" slot="label" @click="clickSexCode('sfslbdm')">
                  <span>师范生类别</span>
                </div>
                <Select v-model="form.sfslbdm" filterable  @on-create="keyUpSearch($event, 'sfslbdm')">
                  <Option v-for="item in sfslbList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
                <!--                <Input v-model="form.sfslbdm" clearable maxlength="70" @keydown.native="keyUpSearch($event,'sfslbdm')"/>-->
              </FormItem>
              <!--              <FormItem label="定向或委培单位" prop="dxhwpdw">-->
              <!--                <Input v-model="form.dxhwpdw" clearable maxlength="70"/>-->
              <!--              </FormItem>-->
              <FormItem prop="dxwpdwszdm">
                <div class="itemLabel" slot="label" @click="clickSexCode('dxwpdwszdm')">
                  <span>定向委培单位所在地</span>
                </div>
                <Select v-model="form.dxwpdwszdm" @on-open-change="handleSelectDataSlice('dxwpdwszdm', $event)"
                        clearable filterable>
                    <Option v-for="(item,index) in areaCodeListSelectData2" :value="item.value" :key="index">{{ item.title }}</Option>
                </Select>
              </FormItem>
              <FormItem label="定向委培单位名称" prop="dxwpdw">
                <Input v-model="form.dxwpdw" clearable maxlength="70"/>
              </FormItem>
              <!--              <FormItem label="是否建档立卡" prop="sfjdlk">-->
              <!--                <Select v-model="form.sfjdlk" clearable filterable>-->
              <!--                  <Option value="是">Y</Option>-->
              <!--                  <Option value="否">N</Option>-->
              <!--                </Select>-->
              <!--              </FormItem>-->
              <FormItem prop="sfjdlk">
                <div class="itemLabel" slot="label" @click="clickSexCode('sfjdlk')">
                  <span>是否建档立卡</span>
                </div>
                <Select v-model="form.sfjdlk" filterable  @on-create="keyUpSearch($event, 'sfjdlk')">
                  <Option v-for="item in sfjdlkList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
              </FormItem>
              <FormItem prop="gzkzksbz">
                <div class="itemLabel" slot="label" @click="clickSexCode('gzkzksbz')">
                  <span>高职扩招考试标志</span>
                </div>
                <Select v-model="form.gzkzksbz" filterable  @on-create="keyUpSearch($event, 'gzkzksbz')">
                  <Option v-for="item in gzkzksbzList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
              </FormItem>
              <FormItem prop="xxxs">
                <div class="itemLabel" slot="label" @click="clickSexCode('xxxs')">
                  <span>学习形式</span>
                </div>
                <Select v-model="form.xxxs" filterable  @on-create="keyUpSearch($event, 'xxxs')">
                  <Option v-for="item in xxxsList" :value="item.value" :key="item.value">{{ item.title }}</Option>
                </Select>
                <!--                <Input v-model="form.xxxs" clearable maxlength="70" @keydown.native="keyUpSearch($event,'xxxs')"/>-->
              </FormItem>
            </Form>
            <!-- </Col> -->
            <div class="br right-bottom-edit">
              <Button type="text" @click="modalVisible = false">取消</Button>
              <div v-if="modalType == 0" style="display: inline">
                <Button v-has="'add'" type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
              </div>
              <div v-if="modalType == 1" style="display: inline">
                <Button v-has="'edit'" type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
              </div>
            </div>
          </Row>
        </Card>
      </Col>
    </Row>
    <!--导入导出-->
    <Drawer title="导入数据" closable v-model="importModalVisible" class="c-drawer01">
      <div style="display: flex; justify-content: space-between; align-items: center">
        <Upload action="" :before-upload="beforeUploadImport" accept=".xls, .xlsx,.dbf,.zip,.rar">
          <Button :loading="reading" icon="ios-cloud-upload-outline" class="cmr10">导入数据</Button>
          <span v-if="uploadfile.name">当前选择文件：{{ uploadfile.name }}</span>
        </Upload>
        <!--        <Button @click="clearImportData" icon="md-trash">清空数据</Button>-->
      </div>
      <Alert type="warning" show-icon>
        导入前请下载查看导入模版数据文件查看所需字段及说明，确保数据格式正确，不得修改列英文名称
      </Alert>
      <Table :columns="importColumns" border :height="height" :data="importTableData" ref="importTable"></Table>
      <div class="drawer-footer">
        <Button @click="downloadTemple" type="info">下载导入模板</Button>
        <div class="wrapper01">
          <Button @click="importModalVisible = false">关闭</Button>
          <!--          <Button-->
          <!--              :loading="importLoading"-->
          <!--              :disabled="importTableData.length <= 0"-->
          <!--              @click="importData"-->
          <!--              style="margin-left: 8px"-->
          <!--              type="primary"-->
          <!--          >-->
          <!--            确认导入-->
          <!--            <span v-if="importTableData.length > 0"-->
          <!--            >{{ importTableData.length }} 条数据</span-->
          <!--            >-->
          <!--          </Button>-->
        </div>
      </div>
    </Drawer>
    <!-- 自定义导出数据 -->
    <Modal v-model="exportModalVisible" :title="exportTitle" :loading="loadingExport" @on-ok="exportCustomData">
      <Form ref="exportForm" :label-width="labelWidth100">
        <FormItem label="导出文件名">
          <Input v-model="filename"/>
        </FormItem>
        <FormItem label="自定义导出列">
          <div class="wrappper02">
            <Checkbox :indeterminate="indeterminate" :value="checkAll" @click.prevent.native="handleCheckAll">全选
            </Checkbox>
          </div>
          <CheckboxGroup v-model="chooseColumns">
            <Checkbox v-for="(item, i) in exportColumns" :label="item.title" :key="i" :value="item.checked"
                      :disabled="item.disabled"></Checkbox>
          </CheckboxGroup>
        </FormItem>
      </Form>
    </Modal>
    <!--table-->
    <Modal v-model="modal" :title="modalTableTitle" @on-ok="clickTrue">
      <!-- 弹出框 -->
      <Row>
        <Col span="12">
          <div class="form-item">
            <label class="form-label">代码</label>
            <Input v-model="searchValueKeyword" placeholder="请输入搜索的代码关键字"
                   @on-change="handleModalTitleSearch"/>
          </div>
        </Col>
        <Col span="12">
          <div class="form-item">
            <label class="form-label">名称</label>
            <Input v-model="searchTitleKeyword" placeholder="请输入搜索的名称关键字"
                   @on-change="handleModalTitleSearch"/>
          </div>
        </Col>
      </Row>
      <Row>
        <Col style="width: 100%">
          <Table class="tabbki" :columns="tableColumns" :data="dataModalList" :scroll="scroll"
                 @on-row-click="handleClickRow" ref="table"></Table>
        </Col>
      </Row>
      <Row type="flex" justify="end" class="page">
        <Page :current="searchModalForm.pageNumber" :total="modalTotal" :page-size="searchModalForm.pageSize"
              @on-change="changeModalPage" size="small" show-total show-elevator></Page>
      </Row>
    </Modal>
    <el-dialog :visible.sync="importPromptVisible" :before-close="handleDialogClose" width="60%" center
               :close-on-press-escape="false" :close-on-click-modal="false">
      <div slot="title" style="display: flex">
        <div style="flex: 1"><span class="fs-20">信息提示</span></div>
      </div>
      <div v-if="type === 'success'">
        <div style="text-align: center">
          <Icon color="#67C23A" size="16px"/>
          <div class='fs-16'>
            <a @click="goToHistoryAndCloseView">{{ tipMessage }}</a>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
// 根据你的实际请求api.js位置路径修改
import {
  addBysXjInfo,
  deleteBysXjInfo,
  easyExcelImportData,
  editBysXjInfo,
  exportAllBysXjInfo,
  getBysXjInfoList,
  importData
} from '@/api/bys/xj/bysXjInfo.js';
import {exportColumn} from '@/api/bys/xj/exportColumnXj.js';
import excel from '@/libs/excel';
import dict from '@/views/my-components/xboot/dict';
import {getDictDataByType, getDictDataByTypeAndPage} from '@/api/index';
import {getByXlAndLevel, getByXlAndLevelPage} from '@/api/bys/code.js';
import {getXldmzdList} from '@/api/bys/code/xldm.js';
import {clearDataAPI} from '../../../api/bys/destinationAfterGraduation';
import XLSX from 'xlsx';
import NoData from '@/components/NoData.vue';

// import Dbf from 'dbf-js';

export function _debounce(fn, delay) {
  var delay = delay || 200;
  var timer;
  return function () {
    var th = this;
    var args = arguments;
    if (timer) {
      clearTimeout(timer);
    }
    timer = setTimeout(function () {
      timer = null;
      fn.apply(th, args);
    }, delay);
  };
}

export function _throttle(fn, interval) {
  var last;
  var timer;
  var interval = interval || 200;
  return function () {
    var th = this;
    var args = arguments;
    var now = +new Date();
    if (last && now - last < interval) {
      clearTimeout(timer);
      timer = setTimeout(function () {
        last = now;
        fn.apply(th, args);
      }, interval);
    } else {
      last = now;
      fn.apply(th, args);
    }
  };
}

export default {
  name: 'bysXjInfo',
  components: {
    dict,
    NoData,
  },
  data() {
    return {
      labelWidth80: 80,
      labelWidth85: 85,
      labelWidth100: 100,
      refHeight: {value: 0},
      type: 'success',
      tipMessage: '',
      importPromptVisible: false,
      importFormView: false,
      importForm: {
        file: null,
        importMode: '1'
      },
      modalTotal: 0,
      searchTitleKeyword: '',
      searchValueKeyword: '',
      importing: false,
      importing1: false,
      importProgress: 0,
      tableData: [],
      areaCodeList: [], //地区代码表
      // 导入导出
      importModalVisible: false,
      searchKey: '',
      searchData: '',
      originData: [],
      reading: false,
      importLoading: false,
      loadingExport: true,
      exportModalVisible: false,
      uploadfile: {
        name: ''
      },
      dataModalList: [],
      chooseColumns: [],
      filename: '基础信息',
      exportTitle: '确认导出',
      exportType: '',
      importTableData: [],
      importColumns: [],
      height: 510,
      exportData: [],
      exportColumns: exportColumn,
      indeterminate: false,
      checkAll: true,

      openSearch: true, // 显示搜索
      openTip: true, // 显示提示
      loading: true, // 表单加载状态
      modalType: 0, // 添加或编辑标识
      modalVisible: false, // 添加或编辑显示
      modalTitle: '', // 添加或编辑标题
      drop: true,
      dropDownContent: '展开',
      dropDownIcon: 'ios-arrow-down',

      xxxsList: [],
      // 原本查询区的表单会使用searchForm字段 这里给他移出来
      queryAreaData: {
        // 根据ref为searchForm的表单 将该表单数据移出来
        yxdm: '',
        yxmc: '',
        ksh: '',
        xh: '',
        sfzh: '',
        xm: ''
      },

      searchForm: {
        // 搜索框初始化对象
        pageNumber: 1, // 当前页数
        pageSize: 50, // 页面大小
        sort: 'createTime', // 默认排序字段
        order: 'desc' // 默认排序方式
      },
      searchModalForm: {
        // 搜索框初始化对象
        pageNumber: 1, // 当前页数
        pageSize: 10, // 页面大小
        sort: 'createTime', // 默认排序字段
        order: 'desc' // 默认排序方式
      },
      height1: 0,
      form: {
        // 添加或编辑表单对象初始化数据
        yxdm: '',
        yxmc: '',
        ksh: '',
        xh: '',
        sfzh: '',
        xm: '',
        xbdm: '',
        mzdm: '',
        zzmmdm: '',
        cx: '',
        cc: '',
        xldm: '',
        zydm: '',
        zy: '',
        zyfx: '',
        zyXsz: '',
        fy: '',
        xsh: '',
        pyfsdm: '',
        syszddm: '',
        // dxhwpdw: "",
        xz: '',
        rxsj: '',
        bysj: '',
        knslbdm: '',
        sfslbdm: '',
        dxwpdwszdm: '',
        dxwpdw: '',
        sfjdlk: '',
        gzkzksbz: '',
        xxxs: ''
        // byqxdm: "",
        // dwzzjgdm: "",
        // dwmc: "",
        // dwxzdm: "",
        // dwhydm: "",
        // dwszddm: "",
        // gzzwlbdm: "",
        // bdzqflbdm: "",
        // bdzqwdwmc: "",
        // qwdwszddm: "",
        // bdzbh: "",
        // bdqssj: "",
      },
      // 表单验证规则
      formValidate: {
        yxdm: [{required: true, message: '不能为空', trigger: 'change'}],
        // yxmc: [{required: true, message: "不能为空", trigger: "change"}],
        ksh: [{required: true, message: '不能为空', trigger: 'change'}],
        xh: [{required: true, message: '不能为空', trigger: 'change'}],
        sfzh: [{required: true, message: '不能为空', trigger: 'change'}],
        xm: [{required: true, message: '不能为空', trigger: 'change'}]
        // xbdm: [{ required: true, message: "不能为空", trigger: "change" }],
        // mzdm: [{ required: true, message: "不能为空", trigger: "change" }],
        // zzmmdm: [{ required: true, message: "不能为空", trigger: "change" }],
        // cx: [{ required: true, message: "不能为空", trigger: "change" }],
        // cc: [{ required: true, message: "不能为空", trigger: "change" }],
        // xldm: [{ required: true, message: "不能为空", trigger: "change" }],
        // pyfsdm: [{ required: true, message: "不能为空", trigger: "change" }],
        // syszddm: [{ required: true, message: "不能为空", trigger: "change" }],
        // knslbdm: [{ required: true, message: "不能为空", trigger: "change" }],
        // sfslbdm: [{ required: true, message: "不能为空", trigger: "change" }],
      },
      submitLoading: false, // 添加或编辑提交状态
      selectList: [], // 多选数据
      columns: [],
      columns_1: [
        // 表头
        {
          type: 'selection',
          width: 60,
          align: 'center'
        },
        {
          type: 'index',
          title: '序号',
          width: 60,
          align: 'center'
        },
        {
          title: '院校代码',
          key: 'yxdm',
          minWidth: 80,
          sortable: false
        },
        {
          title: '院校名称',
          key: 'yxmc',
          minWidth: 180,
          sortable: false
        },
        {
          title: '考生号',
          key: 'ksh',
          minWidth: 140,
          sortable: false
        },
        {
          title: '学号',
          key: 'xh',
          minWidth: 140,
          sortable: false
        },
        {
          title: '身份证号',
          key: 'sfzh',
          minWidth: 180,
          sortable: false
        },
        {
          title: '姓名',
          key: 'xm',
          minWidth: 100,
          sortable: false
        },
        {
          title: '性别',
          key: 'xbdm',
          minWidth: 80,
          sortable: false,
          render: (h, params) => {
            let dict = this.xbList.find(item => item.value == params.row.xbdm);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '民族',
          key: 'mzdm',
          minWidth: 100,
          sortable: false,
          render: (h, params) => {
            let dict = this.mzList.find(item => item.value == params.row.mzdm);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '政治面貌',
          key: 'zzmmdm',
          minWidth: 100,
          sortable: false,
          render: (h, params) => {
            let dict = this.zzmmList.find(item => item.value == params.row.zzmmdm);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '城乡',
          key: 'cx',
          minWidth: 80,
          sortable: false
        },
        // {
        //   title: "学历层次",
        //   key: "cc",
        //   minWidth: 80,
        //   sortable: false,
        //   render: (h, params) => {
        //     let dict = this.xlccDicts.find(item => item.value == params.row.cc)
        //     return h('div', dict ? dict.title : '')
        //   }
        // },
        {
          title: '学历',
          key: 'xldm',
          minWidth: 100,
          sortable: false,
          render: (h, params) => {
            let dict = this.xlList.find(item => item.value == params.row.xldm);
            return h('div', dict ? dict.title : '');
          }
        },
        // {
        //   title: "专业代码",
        //   key: "zydm",
        //   minWidth: 80,
        //   sortable: false,
        // },
        {
          title: '专业',
          key: 'zyXsz',
          minWidth: 170,
          sortable: false
        },
        {
          title: '专业方向',
          key: 'zyfx',
          minWidth: 120,
          sortable: false
        },
        {
          title: '分院',
          key: 'fy',
          minWidth: 120,
          sortable: false
        },
        {
          title: '院系名称',
          key: 'xsh',
          minWidth: 120,
          sortable: false
        },
        // {
        //   title: "院系",
        //   key: "xshdm",
        //   minWidth: 120,
        //   sortable: false,
        // },
        {
          title: '培养方式',
          key: 'pyfsdm',
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            let dict = this.pyfsList.find(item => item.value == params.row.pyfsdm);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '生源所在地',
          key: 'syszddm',
          minWidth: 120,
          sortable: false,
          // render: (h, params) => {
          //     let dict = this.areaCodeList.find(item => item.value == params.row.syszddm);
          //     return h('div', dict ? dict.title : '');
          // }
        },
        // {
        //   title: "定向或委培单位",
        //   key: "dxhwpdw",
        //   minWidth: 120,
        //   sortable: false,
        // },
        {
          title: '学制',
          key: 'xz',
          minWidth: 80,
          sortable: false,
          render: (h, params) => {
            let dict = this.xzList.find(item => item.value == params.row.xz);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '入学时间',
          key: 'rxsj',
          minWidth: 80,
          sortable: false
        },
        {
          title: '毕业时间',
          key: 'bysj',
          minWidth: 80,
          sortable: false
        },
        {
          title: '困难生类别',
          key: 'knslbdm',
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            let dict = this.knslbList.find(item => item.value == params.row.knslbdm);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '师范生类别',
          key: 'sfslbdm',
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            let dict = this.sfslbList.find(item => item.value == params.row.sfslbdm);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '定向委培单位所在地',
          key: 'dxwpdwszdm',
          minWidth: 130,
          sortable: false,
          render: (h, params) => {
            let dict = this.areaCodeList.find(item => item.value === params.row.dxwpdwszdm);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '定向委培单位名称',
          key: 'dxwpdw',
          minWidth: 120,
          sortable: false
        },
        {
          title: '是否建档立卡',
          key: 'sfjdlk',
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            let dict = this.sfjdlkList.find(item => item.value == params.row.sfjdlk);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '高职扩招考试标志',
          key: 'gzkzksbz',
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            let dict = this.gzkzksbzList.find(item => item.value == params.row.gzkzksbz);
            return h('div', dict ? dict.title : '');
          }
        },
        {
          title: '学习形式',
          key: 'xxxs',
          minWidth: 100,
          sortable: false
        },
        {
          title: '有无生源',
          key: 'sfysy',
          minWidth: 150,
          sortable: false,
          fixed: 'right',
          render: (h, params) => {
            if (params.row.sfysy) {
              return h('div', [
                h('Badge', {
                  props: {
                    status: 'success',
                    text: '有生源'
                  }
                })
              ]);
            } else {
              return h('div', [
                h('Badge', {
                  props: {
                    status: 'default',
                    text: '无生源'
                  }
                })
              ]);
            }
          }
        },
        {
          fixed: 'right',
          title: '操作',
          key: 'action',
          align: 'center',
          width: 150,
          render: (h, params) => {
            return h('div', [
              h(
                  'a',
                  {
                    style: {
                      display: this.hasPermission(this, 'edit') ? 'inline-block' : 'none'
                    },
                    on: {
                      click: () => {
                        this.edit(params.row);
                      }
                    }
                  },
                  '编辑'
              ),
              h('Divider', {
                props: {
                  type: 'vertical'
                },
                style: {
                  display: this.hasPermission(this, 'delete') ? 'inline-block' : 'none'
                }
              }),
              h(
                  'a',
                  {
                    style: {
                      display: this.hasPermission(this, 'delete') ? 'inline-block' : 'none'
                    },
                    on: {
                      click: () => {
                        this.remove(params.row);
                      }
                    }
                  },
                  '删除'
              )
            ]);
          }
        }
      ],
      defultColumns: [
        {
          title: '代码',
          key: 'value',
          sortable: false,
          align: 'center'
        },
        {
          title: '名称',
          key: 'title',
          sortable: false,
          align: 'center'
        }
      ],
      data: [], // 表单数据
      total: 0, // 表单数据总数
      showRight: true,
      dataList: [],
      scroll: {
        y: '200px' // 表头固定的高度
      },
      // 弹框
      modal: false,
      modalTableTitle: '',
      tableColumns: [
        {
          title: '代码',
          key: 'value',
          sortable: false,
          align: 'center'
        },
        {
          title: '名称',
          key: 'title',
          sortable: false,
          align: 'center'
        }
      ],
      keyValueColumns: [
        {
          title: '代码',
          key: 'value',
          sortable: false,
          align: 'center'
        },
        {
          title: '名称',
          key: 'title',
          sortable: false,
          align: 'center'
        }
      ],
      modalDict: '',
      showCode: '', //双击行传递的值
      rowList: null,
      xlccDicts: [],
      yxList: [],
      xbList: [],
      // jdlkList:[],
      mzList: [],
      xzList: [],
      zzmmList: [],
      // xlccList,
      xlList: [],
      pyfsList: [],
      knslbList: [],
      sfslbList: [],
      gzkzksbzList: [],
      sfjdlkList: [],
      zyList: [],
      xxxs: [],
      xlflColumns: [
        {
          title: '学历分类',
          key: 'xlflz',
          sortable: false,
          align: 'center',
          render: (h, params) => {
            let dict = this.xlccDicts.find(item => item.value == params.row.xllxz).title;
            return h('div', dict ? dict : '');
          }
        },
        {
          title: '代码',
          key: 'value',
          sortable: false,
          align: 'center'
        },
        {
          title: '名称',
          key: 'title',
          sortable: false,
          align: 'center'
        }
      ],
      zyColumns: [
        {
          title: '学历分类',
          key: 'xlflz',
          sortable: false,
          align: 'center',
          render: (h, params) => {
            let dict = this.xlccList.find(item => item.value == params.row.xllxz).title;
            return h('div', dict ? dict : '');
          }
        },
        {
          title: '代码',
          key: 'zydm',
          sortable: false,
          align: 'center'
        },
        {
          title: '专业',
          key: 'zy',
          sortable: false,
          align: 'center'
        }
        // {
        //   title: '专业',
        //   key: 'title',
        //   sortable: false,
        //   align: 'center',
        // }
      ],
      yxdmSelectData: [],
      areaCodeListSelectData1: [],
      areaCodeListSelectData2: [],
      zyListSelectData: [],
      importErrorData: [],
      importErrorCol: [
        {
          title: '身份证号',
          key: 'rowes',
          width: 100
        },
        {
          title: '错误信息',
          key: 'reason',
          width: 200
        },
        {title: '详细信息', key: 'data'}
      ]
    };
  },
  watch: {
    modalDict(val) {
      return this.handleWatchModalDictData(this.currentModalSearch);
    }
  },
  methods: {
    handleExportErrData() {
      let data = this.importErrorData;
      data = data.map(item => {
        return {
          rowes: item.rowes,
          reason: item.reason,
          data: item.data
        };
      });
      const wb = XLSX.utils.book_new();
      data = [{rowes: '身份证号', reason: '错误信息', data: '详细信息'}, ...data];

      const ws = XLSX.utils.json_to_sheet(data, {skipHeader: true});
      XLSX.utils.book_append_sheet(wb, ws, '错误信息');
      XLSX.writeFile(wb, '错误信息.xlsx');
    },

    handleImportSuccess(message, data) {
      this.importPromptVisible = true;
      this.tipMessage_2 = message;
      this.importErrorData = data;
      this.$emit('stop_loop_req');
      this.type = 'success';
      this.tipMessage = '';
      this.importing = false; // 按钮状态
    },
    goToHistory() {
      this.$router.push({name: 'ImportHistory'});
    },

    handleSelectDataSlice(key, e) {
      let key1, key2;
      if (key === 'yxdm') {
        key1 = 'yxdmSelectData';
        key2 = 'yxList';
      } else if (key === 'syszddm') {
        key1 = 'areaCodeListSelectData1';
        key2 = 'areaCodeList';
      } else if (key === 'dxwpdwszdm') {
        key1 = 'areaCodeListSelectData2';
        key2 = 'areaCodeList';
      } else if (key === 'zyXsz') {
        // 专业
        key1 = 'zyListSelectData';
        key2 = 'zyList';
      }
      if (e) {
        Object.freeze(this[key2]);
        this[key1] = this[key2];
      } else {
        // 这里不能为空 得按照这个值 在this[key2] 中找到item 然后放入this[key1]
        let v = this.form[key];

        let data;
        for (let i = 0; i < this[key2].length; i++) {
          if (this[key2][i].value === v) {
            data = this[key2][i];

            break;
          }
        }
        if (data) {
          this[key1] = [data];
        } else {
          this[key1] = [];
        }
      }
    },

    // region TODO 清空数据
    clearData() {
      this.$confirm('此操作将永久删除数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
          .then(() => {
            clearDataAPI().then(res => {
              if (res.success) {
                this.$message.success(res.message);
                this.getTableData();
                this.getDataList();
              }
            });
          })
          .catch(() => {
            this.$message({
              type: 'info',
              message: '已取消删除'
            });
          });
    },
    // endregion
    handleUpload(file) {
      const fileExt = file.name
          .split('.')
          .pop()
          .toLocaleLowerCase();
      if (!(fileExt == 'xlsx' || fileExt == 'xls' || fileExt == 'dbf' || fileExt == 'zip' || fileExt == 'rar')) {
        this.$Notice.warning({
          title: '文件类型错误',
          desc: '所选文件‘ ' + file.name + ' ’不是EXCEL文件、DBF文件、压缩包文件，请选择后缀为.xlsx或者.xls,.dbf,.zip,.rar的文件。'
        });
      } else {
        this.importForm.file = file;
      }
      // this.importForm.file = file;
      return false;
    },

    handleDialogClose(done) {
      // 在这里要停止轮询
      this.$emit('stop_loop_req');
      this.tipMessage_2 = '\t';

      this.importFormcCncel(); // 清空input表单 关闭导入框
      this.getDataList(); // 获取数据

      done();
    },
    goToHistoryAndCloseView() {
      this.importPromptVisible = false;
      this.$router.push({
        name: 'ImportHistory'
      });
    },

    async importFormOk() {
      if (this.importForm.file == null) {
        this.$Message.info('请选择文件');
        return;
      }
      let formData = new FormData();
      formData.append('importMode', this.importForm.importMode); // 添加参数
      formData.append('file', this.importForm.file);
      this.importing = true;
      easyExcelImportData(formData).then(res => {
        if (res.code === 200) {
          // this.$message.success("导入开始，请前往导入历史查看导入结果信息")
          this.importing = false;
          this.importFormView = false;
          this.tipMessage = "导入正在进行，点击此处或关闭弹窗点击导入历史按钮查看导入结果信息";
          // this.importErrorData = [];
          this.type = 'success';
          this.importPromptVisible = true;
          // this.importFormView = false;
          // this.tipMessage = res.message;
          // this.importErrorData=[]
          // this.type = 'success';
          // this.importPromptVisible = true;
          // let timer = setInterval(() => {
          //     this.postRequest('/history/getHistory').then(res => {
          //         let data = res.result[0]; // 直接取最上面的任务
          //         let { status } = data;
          //         if (status === '1') {
          //             this.handleImportSuccess(data.message,data.importErrorVos);
          //         }
          //     });
          // }, 5000);
          // this.$on('stop_loop_req', () => {
          //     clearInterval(timer);
          //     console.log('停止计时器');
          // });
        }
      });
    },
    importFormcCncel() {
      this.importForm.file = null;
      this.importFormView = false;
    },
    changeModalPage(v) {
      this.searchModalForm.pageNumber = v;
      this.handleWatchModalDictData(this.currentModalSearch);
    },
    handleModalTitleSearch() {
      this.handleWatchModalDictData(this.currentModalSearch);
    },
    handleWatchModalDictData(e) {
      this.dataModalList = [];
      if (e === 'xbdm') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'sex',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'mzdm') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'ethnic',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'zzmmdm') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'political',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'pyfsdm') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'training-methods',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'knslbdm') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'difficult-student-category',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'sfslbdm') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'sfs_type',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'xxxs') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'learning-forms',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'xz') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'educational-system',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'syd_code') {
        this.postRequest('/areaCode/getByPage', {
          ...this.searchModalForm,
          code: this.searchValueKeyword,
          displayName: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.records.map(e => {
              return {value: e.code, title: e.displayName};
            });
            this.modalTotal = res.result.total;
          }
        });
      } else if (e === 'dxwpdwszdm') {
        this.postRequest('/areaCode/getByPage', {
          ...this.searchModalForm,
          code: this.searchValueKeyword,
          displayName: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.records.map(e => {
              return {value: e.code, title: e.displayName};
            });
            this.modalTotal = res.result.total;
          }
        });
      } else if (e == 'yxdm') {
        this.postRequest('/schoolCode/getByPage', {
          ...this.searchModalForm,
          code: this.searchValueKeyword,
          name: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.records.map(e => {
              return {value: e.code, title: e.name};
            });
            this.modalTotal = res.result.total;
          }
        });
      } else if (e == 'yxmc') {
        this.postRequest('/schoolCode/getByPage', {
          ...this.searchModalForm,
          code: this.searchValueKeyword,
          name: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.records.map(e => {
              return {value: e.code, title: e.name};
            });
            this.modalTotal = res.result.total;
          }
        });
      } else if (e === 'zyXsz') {
        getByXlAndLevelPage({
          ...this.searchModalForm,
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.records.map(el => {
              return {
                xllxz: el.gradLevelDict,
                value: el.profCode + el.title,
                title: el.profCode + el.title,
                zy: el.title,
                zydm: el.profCode
              };
            });
            this.modalTotal = res.result.total;
          }
        });
      } else if (e == 'xldm') {
        getXldmzdList({
          ...this.searchModalForm,
          xldm: this.searchValueKeyword,
          xl: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.records.map(el => {
              return {
                value: el.xldm,
                title: el.xl,
                xllxz: el.xllxz
              };
            });
            this.modalTotal = res.result.total;
          }
        });
      } else if (e === 'gzkzksbz') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'higher-voc-ex-exam',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      } else if (e === 'sfjdlk') {
        getDictDataByTypeAndPage({
          ...this.searchModalForm,
          type: 'sfjdlk',
          value: this.searchValueKeyword,
          title: this.searchTitleKeyword
        }).then(res => {
          if (res.success) {
            this.dataModalList = res.result.content;
            this.modalTotal = res.result.totalElements;
          }
        });
      }
    },
    tableheig() {
      var bbb = document.getElementsByClassName('calc-px-height')[0].scrollHeight;
      var aaa = document.getElementsByClassName('calc-px-height')[0].children[0].children[0].children[1];
      var ccc = document.getElementsByClassName('calc-px-height')[0].children[0].children[0].children[0].scrollHeight;
      var ddd = bbb - ccc;
      aaa.style.height = `${ddd}px`;

      if (this.searchForm.pageSize === 10) {
        this.height1 = 0;
      } else {
        this.height1 = document.getElementsByClassName('calc-px-height')[0].scrollHeight;
        if (this.total < this.searchForm.pageNumber * this.searchForm.pageSize) {
          var r = (this.searchForm.pageNumber - 1) * this.searchForm.pageSize;
          var a = this.total - r;
          var s = a * 43 + 65;
          if (s < this.height1) {
            this.height1 = 0;
          }
        }
      }
      if (this.total < 10) {
        this.height1 = 0;
      }
    },
    getTableData() {
      this.tableData = this.dataList;
    },
    init() {
      this.getData('sex');
      this.getDataList();
      this.getDictData();
    },
    //字典
    getDictData() {
      // 学历层次
      getDictDataByType('eduLevelType').then(res => {
        if (res.success) {
          this.xlccDicts = res.result;
        }
      });

      // 生源所在地->取自数据库地区代码
      this.postRequest('/areaCode/getAll').then(res => {
        if (res.success) {
          this.areaCodeList = res.result.map(e => {
            return {title: e.displayName, value: e.code};
          });
          console.log('this.areaCodeList', this.areaCodeList);
        }
      });

      //院校代码 ->取自数据库学校信息
      this.postRequest('/schoolCode/getAll').then(res => {
        if (res.success) {
          this.yxList = res.result.map(e => {
            return {
              title: e.name,
              value: e.code
            };
          });
        }
      });
    },
    getZydm() {
      getByXlAndLevel({gradLevelDict: this.form.cc, level: '2'}).then(res => {
        if (res.success) {
          this.dataList = res.result.map(e => {
            return {
              title: e.title,
              value: e.profCode,
              zy: el.title,
              zydm: el.profCode,
              xllxz: el.gradLevelDict
            };
          });
        }
      });
    },
    getData(v) {
      getDictDataByType('sex').then(res => {
        if (res.success) {
          this.xbList = res.result;
        }
      });
      // getDictDataByType('sfjdlk').then((res) => {
      //   if (res.success) {
      //     this.jdlkList = res.result;
      //   }
      // });
      getDictDataByType('ethnic').then(res => {
        if (res.success) {
          this.mzList = res.result;
        }
      });
      getDictDataByType('higher-voc-ex-exam').then(res => {
        if (res.success) {
          console.log('this.gzkzksbzList1', this.gzkzksbzList);
          this.gzkzksbzList = res.result;
        }
      });
      // getDictDataByType('sfjdlk').then((res) => {
      //   if (res.success) {
      //     this.sfjdlkList = res.result;
      //   }
      // });

      getDictDataByType('political').then(res => {
        if (res.success) {
          this.zzmmList = res.result;
        }
      });
      // 学历层次
      getDictDataByType('eduLevelType').then(res => {
        if (res.success) {
          this.xlccList = res.result;
        }
      });
      getDictDataByType('degree').then(res => {
        if (res.success) {
          this.xlList = res.result;
        }
      });
      getDictDataByType('training-methods').then(res => {
        if (res.success) {
          this.pyfsList = res.result;
        }
      });
      getDictDataByType('difficult-student-category').then(res => {
        if (res.success) {
          this.knslbList = res.result;
        }
      });
      getDictDataByType('sfs_type').then(res => {
        if (res.success) {
          this.sfslbList = res.result;
        }
      });
      getDictDataByType('higher-voc-ex-exam').then(res => {
        if (res.success) {
          console.log('this.gzkzksbzList', this.gzkzksbzList);
          this.gzkzksbzList = res.result;
        }
      });
      getDictDataByType('sfjdlk').then(res => {
        if (res.success) {
          this.sfjdlkList = res.result;
        }
      });
      getDictDataByType('learning-forms').then(res => {
        if (res.success) {
          this.xxxsList = res.result;
        }
      });
      //   educational-system 学制
      getDictDataByType('educational-system').then(res => {
        if (res.success) {
          this.xzList = res.result;
        }
      });
      getByXlAndLevel({level: '2'}).then(res => {
        if (res.success) {
          this.zyList = res.result.map(el => {
            return {
              xllxz: el.gradLevelDict,
              value: el.profCode + el.title,
              title: el.profCode + el.title,
              zy: el.title,
              zydm: el.profCode,
              id: el.gradLevelDict + el.profCode + el.title
            };
          });
        }
      });
    },
    // 显示隐藏右侧区域
    clickShowRight() {
      this.showRight = !this.showRight;
    },
    handChange() {
      const selectedItem = this.yxList.find(item => item.value === this.form.yxdm);
      if (selectedItem) {
        this.form.yxmc = selectedItem.title;
      }
    },
    keyUpSearch(e, value) {
      this.showDict(value);
      if (e.keyCode == 13 || e.keyCode == 9) {
        if (value == 'sexCode') {
          this.form.sexCode = this.sexCodeList.find(item => item.value == e.target.value).title;
        } else if (value == 'yxdm') {
          this.form.yxdm = this.yxList.find(item => item.value == e.target.value).title;
        } else if (value == 'yxmc') {
          this.form.yxmc = this.yxList.find(item => item.value == e.target.value).title;
        } else if (value == 'mzCode') {
          this.form.mzCode = this.mzList.find(item => item.value == e.target.value).title;
        } else if (value == 'zzmmCode') {
          this.form.zzmmCode = this.zzmmList.find(item => item.value == e.target.value).title;
        } else if (value == 'xlCode') {
          this.form.xlCode = this.xlList.find(item => item.value == e.target.value).title;
        } else if (value == 'pyfsCode') {
          this.form.pyfsCode = this.pyfsList.find(item => item.value == e.target.value).title;
        } else if (value == 'knslbCode') {
          this.form.knslbCode = this.knslbList.find(item => item.value == e.target.value).title;
        } else if (value == 'ffslbCode') {
          this.form.ffslbCode = this.sfslbList.find(item => item.value == e.target.value).title;
        } else if (value == 'gzkzksbz') {
          this.form.gzkzksbz = this.gzkzksbzList.find(item => item.value == e.target.value).title;
        } else if (value == 'sfjdlk') {
          this.form.sfjdlk = this.sfjdlkList.find(item => item.value == e.target.value).title;
        } else if (value == 'xxxs') {
          this.form.xxxs = this.xxxsList.find(item => item.value == e.target.value).title;
        } else if (value == 'zyXsz') {
          this.form.zyXsz = this.zyList.find(item => item.value == e.target.value).title;
        } else if (value === 'sydCode') {
          this.form.sydCode = this.areaCodeList.find(item => item.value == e.target.value).title;
        } else if (value === 'cxsy') {
          this.form.cxsy = this.cxsyList.find(item => item.value == e.target.value).title;
        }
      }
    },
    //代码按钮
    clickSexCode(e) {
      this.showCode = e;
      this.modal = true;
      this.searchTitleKeyword = '';
      this.searchValueKeyword = '';
      this.searchModalForm.pageNumber = 1;
      this.searchModalForm.pageSize = 50;
      this.currentModalSearch = e;
      this.showDict(e);
    },
    showDict(e) {
      this.tableColumns = this.defultColumns;
      if (e == 'xbdm') {
        this.modalTableTitle = '性别';
        this.modalDict = 'sex';
      } else if (e == 'mzdm') {
        this.modalTableTitle = '民族';
        this.modalDict = 'ethnic';
      } else if (e == 'zzmmdm') {
        this.modalTableTitle = '政治面貌';
        this.modalDict = 'political';
      } else if (e == 'xldm') {
        this.modalTableTitle = '学历';
        this.modalDict = 'degree';
        this.tableColumns = this.xlflColumns;
      } else if (e == 'zyXsz') {
        this.modalTableTitle = '专业';
        this.modalDict = 'zyXsz';
        this.tableColumns = this.zyColumns;
      } else if (e == 'yxdm') {
        this.modalTableTitle = '院校名称';
        this.modalDict = 'yxdm';
      } else if (e == 'pyfsdm') {
        this.modalTableTitle = '培养方式';
        this.modalDict = 'training-methods';
      } else if (e == 'knslbdm') {
        this.modalTableTitle = '困难生类别';
        this.modalDict = 'difficult-student-category';
        // this.modal = true
      } else if (e == 'sfslbdm') {
        this.modalTableTitle = '师范生类别';
        this.modalDict = 'sfs_type';
      } else if (e == 'gzkzksbz') {
        this.modalTableTitle = '高职扩招考试标志';
        this.modalDict = 'higher-voc-ex-exam';
      } else if (e == 'sfjdlk') {
        this.modalTableTitle = '是否建档立卡';
        this.modalDict = 'sfjdlk';
      } else if (e == 'xxxs') {
        this.modalTableTitle = '学习形式';
        this.modalDict = 'learning-forms';
      } else if (e == 'xz') {
        this.modalTableTitle = '学制';
        this.modalDict = 'educational-system';
      } else if (e == 'syd_code') {
        this.modalTableTitle = '生源地';
        this.modalDict = 'syd_code';
      } else if (e == 'dxwpdwszdm') {
        this.modalTableTitle = '定向或委培单位所在地';
        this.modalDict = 'syd_code';
      }
      this.handleWatchModalDictData(this.currentModalSearch);
    },
    //弹框按钮
    clickTrue() {
      console.log(this.showCode);
      console.log(this.rowList);
      this.modal = false;
      this.form[this.showCode] = this.rowList.value;
      if (this.showCode == 'yxdm') {
        this.form['yxmc'] = this.rowList.title;
      }
      if (this.showCode == 'syd_code') {
        this.form['syszddm'] = this.rowList.value;
      }
    },
    // table
    handleClickRow(row) {
      this.rowList = row;
      this.clickTrue();
    },
    // 读取文件
    readFile(file) {
      this.reading = true;
      const reader = new FileReader();
      reader.readAsArrayBuffer(file);
      reader.onerror = e => {
        this.reading = false;
        // this.$Message.error("文件读取出错");
        this.$Message.error({
          content: '文件读取出错',
          duration: 5,
          closable: true
        });
      };
      reader.onload = e => {
        const data = e.target.result;
        const {header, results} = excel.read(data, 'array');
        const tableTitle = header.map(item => {
          return {title: item, key: item, minWidth: 130, align: 'center'};
        });

        this.importTableData = results;
        this.importColumns = tableTitle;
        this.reading = false;
        this.$Message.success('读取数据成功');
      };
    },

    // 全选
    handleCheckAll() {
      this.indeterminate = !this.indeterminate;
      this.checkAll = !this.checkAll;
      if (this.checkAll) {
        this.chooseColumns = this.exportColumns.map(el => el.title);
      } else {
        this.chooseColumns = [];
      }
    },
    exportCustomData() {
      if (this.filename == '') {
        this.filename = '基础信息';
      }
      // 判断勾选导出列
      let array = [];
      this.exportColumns.forEach(e => {
        this.chooseColumns.forEach(c => {
          if (e.title == c && !e.disabled) {
            array.push(e);
          }
        });
      });
      this.exportColumns = array;
      this.exportModalVisible = false;
      let title = [];
      let key = [];
      this.exportColumns.forEach(e => {
        title.push(e.title);
        key.push(e.key);
      });
      const params = {
        title: title,
        key: key,
        data: this.exportData,
        autoWidth: true,
        filename: this.filename
      };
      excel.export_array_to_excel(params);
    },

    //导出所选数据
    dropExportData() {
      if (this.selectList.length <= 0) {
        this.$Message.warning('您还未选择要导出的数据');
        return;
      }
      this.chooseColumns = this.exportColumns.map(el => el.title);
      this.exportType = 'part';
      this.exportModalVisible = true;
      this.exportTitle = '确认导出 ' + this.selectList.length + ' 条数据';
      this.exportData = this.selectList;
      // "确认导出 " + this.selectList.length + " 条数据(付费)";
    },
    //导出全部数据
    dropExportAll() {
      this.importing1 = true;

      exportAllBysXjInfo().then(res => {
        this.importing1 = false;
        // type的格式可以可以设置，可以把appcation/json设置进去，然后设置导出的类型
        const blob = new Blob([res], {type: 'charset=utf-8'});
        let url = window.URL.createObjectURL(blob);

        const link = document.createElement('a');
        link.style.display = 'none';
        link.href = url;
        link.setAttribute('download', '基础本信息.xlsx');
        document.body.appendChild(link);
        link.click();
        document.body.removeChild(link); // 删除节点
        window.URL.revokeObjectURL(url); //释放该 url
      });
    },

    importData() {
      let params = this.importTableData.map(item => {
        return {
          yxdm: item['yxdm'],
          yxmc: item['yxmc'],
          ksh: item['ksh'],
          sfzh: item['sfzh'],
          xh: item['xh'],
          xm: item['xm'],
          xbdm: item['xbdm'],
          mzdm: item['mzdm'],
          zzmmdm: item['zzmmdm'],
          xldm: item['xldm'],
          zydm: item['zydm'],
          zy: item['zy'],
          zyfx: item['zyfx'],
          pyfsdm: item['pyfsdm'],
          syszddm: item['syszddm'],
          xz: item['xz'],
          rxsj: item['rxsj'],
          bysj: item['bysj'],
          knslbdm: item['knslbdm'],
          sfslbdm: item['sfslbdm'],

          cx: item['cx'],
          cc: item['cc'],
          fy: item['fy'],
          xsh: item['xsh'],
          dxwpdwszdm: item['dxwpdwszdm'],
          dxwpdw: item['dxwpdw'],
          sfjdlk: item['sfjdlk'],
          gzkzksbz: item['gzkzksbz'],
          xxxs: item['xxxs']
        };
      });
      this.importLoading = true;
      importData(params).then(res => {
        this.importLoading = false;
        if (res.success) {
          this.importModalVisible = false;
          this.getDataList();
          this.$Modal.info({
            title: '导入结果',
            content: res.message
          });
        }
      });
    },
    downloadTemple() {
      window.location.href = process.env.BASE_URL + '基础信息导入模板.xlsx';
    },
    clearImportData() {
      this.importTableData = [];
      this.importColumns = [];
      this.uploadfile = {};
    },
    //导入数据
    dropImportData() {
      this.importModalVisible = true;
    },
    beforeUploadImport(file) {
      this.importing = true;
      this.submitLoading = true;
      this.uploadfile = file;
      const fileExt = file.name
          .split('.')
          .pop()
          .toLocaleLowerCase();
      // if (fileExt == "xlsx" || fileExt == "xls"|| fileExt == "dbf"|| fileExt == "zip"|| fileExt == "rar") {
      if (fileExt == 'xlsx' || fileExt == 'xls' || fileExt == 'dbf' || fileExt == 'zip' || fileExt == 'rar') {
        const formData = new FormData();
        formData.append('file', file);
        // 发送请求给后端
        easyExcelImportData(formData).then(res => {
          if (res.code === 200) {
            this.$Notice.info({
              title: '提示',
              desc: res.message
            });
            this.getDataList();
          } else {
            const byteArray = Uint8Array.from(atob(res.result), c => c.charCodeAt(0));
            const blob = new Blob([byteArray], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
            // 创建临时 URL 对象
            const url = URL.createObjectURL(blob);
            const downloadLink = document.createElement('a');
            downloadLink.href = url;
            downloadLink.download = '导入失败数据汇总.xlsx'; // 设置文件名
            downloadLink.click();
          }
          this.submitLoading = false;
          this.importing = false;
        });
      } else {
        this.$Notice.warning({
          title: '文件类型错误',
          desc: '所选文件‘ ' + file.name + ' ’不是EXCEL文件、DBF文件、压缩包文件，请选择后缀为.xlsx或者.xls,.dbf,.zip,.rar的文件。'
        });
      }
      return false;
    },

    changePage(v) {
      this.searchForm.pageNumber = v;
      this.getDataList();
      this.clearSelectAll();
    },
    changePageSize(v) {
      this.searchForm.pageSize = v;
      this.getDataList();
    },
    handleSearch() {
      this.searchForm.pageNumber = 1;
      this.searchForm.pageSize = 50;
      console.log('执行getDataList');

      console.log(this.queryAreaData);
      this.getDataList();
    },

    handleReset() {
      this.$refs.searchForm.resetFields();
      this.searchForm.pageNumber = 1;
      this.searchForm.pageSize = 50;
      // 重新加载数据
      this.getDataList();
    },
    changeSort(e) {
      this.searchForm.sort = e.key;
      this.searchForm.order = e.order;
      if (e.order === 'normal') {
        this.searchForm.order = '';
      }
      this.getDataList();
    },
    clearSelectAll() {
      this.$refs.table.selectAll(false);
    },
    changeSelect(e) {
      this.selectList = e;
    },
    dropDown() {
      if (this.drop) {
        this.dropDownContent = '展开';
        this.dropDownIcon = 'ios-arrow-down';
      } else {
        this.dropDownContent = '收起';
        this.dropDownIcon = 'ios-arrow-up';
      }
      this.drop = !this.drop;
    },
    getDataList() {
      this.selectList.length = 0;
      this.loading = true;

      getBysXjInfoList({
        ...this.queryAreaData,
        ...this.searchForm
      }).then(res => {
        this.loading = false;
        if (res.success) {
          let value = res.result;
          console.log("基础信息", value);
          this.data = [];
          value.records.forEach(el => {
            el.zy == null ? el.zyXsz = el.zydm : el.zyXsz = el.zydm + el.zy
            this.data.push(el);
          });
          this.total = value.total;

          // this.tableheig();
          // (this.data.length == 0 && this.searchForm.pageNumber > 1) {
          //this.searchForm.pageNumber -= 1;
          //this.getDataList();
          //}
        }
      });
    },
    handleSubmit() {
      this.$refs.form.validate(valid => {
        if (valid) {
          try {
            // this.form.zy = this.form.zyXsz?this.zyList.find(item => item.value ==this.form.zyXsz).zy:"";
            this.form.zy = this.zyList.find(item => item.value == this.form.zyXsz).zy;
            this.form.zydm = this.zyList.find(item => item.value == this.form.zyXsz).zydm;
          } catch (e) {
          }

          this.submitLoading = true;
          if (this.modalType === 0) {
            // 添加 避免编辑后传入id等数据 记得删除
            delete this.form.id;
            addBysXjInfo(this.form).then(res => {
              this.submitLoading = false;
              if (res.success) {
                this.$Message.success('操作成功');
                this.getDataList();
                this.modalVisible = false;
              }
            });
          } else {
            // 编辑
            let params = {...this.form}
            console.log(this.form);
            delete params.createTime
            delete params.updateTime
            editBysXjInfo(params).then(res => {
              this.submitLoading = false;
              if (res.success) {
                this.$Message.success('操作成功');
                this.getDataList();
                this.modalVisible = false;
              }
            });
          }
        }
      });
    },
    add() {
      this.modalType = 0;
      this.modalTitle = '添加';
      this.$refs.form.resetFields();
      delete this.form.id;
      this.modalVisible = true;
    },
    // 双击表格行
    sjclaib(v) {
      this.showRight = true;
      this.modalType = 1;
      this.modalTitle = '编辑区';
      this.$refs.form.resetFields();
      // 转换null为""
      for (let attr in v) {
        if (v[attr] === null) {
          v[attr] = '';
        }
      }
      let str = JSON.stringify(v);
      let data = JSON.parse(str);
      this.form = data;
      this.modalVisible = true;

      this.updateSelectData();
    },
    updateSelectData() {
      this.handleSelectDataSlice('yxdm', false);
      this.handleSelectDataSlice('syszddm', false);
      this.handleSelectDataSlice('dxwpdwszdm', false);
      this.handleSelectDataSlice('zyXsz', false);
    },
    edit(v) {
      this.modalType = 1;
      this.modalTitle = '编辑区';
      this.$refs.form.resetFields();
      // 转换null为""
      for (let attr in v) {
        if (v[attr] === null) {
          v[attr] = '';
        }
      }
      let str = JSON.stringify(v);

      this.form = JSON.parse(str);

      this.modalVisible = true;
      console.log(this);
      this.updateSelectData();
    },
    remove(v) {
      this.$Modal.confirm({
        title: '确认删除',
        // 记得确认修改此处
        content: '您确认要删除该条数据?',
        loading: true,
        onOk: () => {
          // 删除
          deleteBysXjInfo({ids: v.id}).then(res => {
            this.$Modal.remove();
            if (res.success) {
              this.$Message.success('操作成功');
              this.clearSelectAll();
              //    this.total : 总数据条数
              //    this.searchForm.pageSize: 每页多少条数据
              //    this.searchForm.pageNumber: 当前页码(当前是哪一页)
              const totalPage = Math.ceil((this.total - 1) / this.searchForm.pageSize);
              this.searchForm.pageNumber = this.searchForm.pageNumber > totalPage ? totalPage : this.searchForm.pageNumber;
              this.searchForm.pageNumber = this.searchForm.pageNumber < 1 ? 1 : this.searchForm.pageNumber;
              this.getDataList();
            }
          });
        }
      });
    },
    delAll() {
      if (this.selectList.length <= 0) {
        this.$Message.warning('您还未选择要删除的数据');
        return;
      }
      this.$Modal.confirm({
        title: '确认删除',
        content: '您确认要删除所选的 ' + this.selectList.length + ' 条数据?',
        loading: true,
        onOk: () => {
          let ids = '';
          this.selectList.forEach(function (e) {
            ids += e.id + ',';
          });
          ids = ids.substring(0, ids.length - 1);
          // 批量删除
          deleteBysXjInfo({ids: ids}).then(res => {
            this.$Modal.remove();
            if (res.success) {
              this.$Message.success('操作成功');
              this.clearSelectAll();
              this.getDataList();
            }
          });
        }
      });
    },
    onRestWindow() {
      this.columns = this.restTableCellWidth(this.columns_1)
      this.labelWidth80 = this.searchLabelWidth(this.labelWidth80)
      this.labelWidth85 = this.searchLabelWidth(this.labelWidth85)
      this.labelWidth100 = this.searchLabelWidth(this.labelWidth100)
    },
  },
  beforeDestroy() {
    window.removeEventListener('resize', this.onRestWindow)
  },
  mounted() {
    this.onRestWindow()
    window.addEventListener('resize', this.onRestWindow)
    // 计算高度
    this.height = Number(document.documentElement.clientHeight - 230);
    this.init();
    this.getTableData();

    console.log(this);
  }
};
</script>
<style lang="less" scoped>
/deep/ .ivu-select-dropdown {
  // display: none;
}

.form-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  margin-right: 15px;
}

.form-label {
  margin-right: 10px;
  width: 40px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.tabbki {
  /deep/ .ivu-table {
    overflow-y: auto;

    .ivu-table-body {
      height: 450px !important;
    }
  }
}

.ivu-input-prefix {
  top: 0.03rem;
}

.itemLabel {
  span {
    color: rgb(55, 140, 254) !important;
    cursor: pointer;
  }
}

.selected {
  background-color: #f5f7fa;
}

// /deep/ .ivu-table-fixed-right {
//     right: 17px !important;
// }
// /deep/ .ivu-table {
//     .ivu-table-body {
//         // height: 90.5% !important;
//         overflow-y: scroll;

//         .ivu-table-row {
//             &:hover {
//                 .ivu-input {
//                     background: rgb(235, 247, 255);
//                 }
//             }
//         }

//         .ivu-input {
//             border: none !important;
//             cursor: default;

//             &:hover {
//                 border: none !important;
//                 background: rgb(235, 247, 255);
//             }
//         }
//     }
// }
</style>
<style lang="less" scoped>
// 建议引入通用样式 具体路径自行修改 可删除下面样式代码
@import '../../../styles/table-common.less';
@import '../../personInfo.less';

.search {
  .operation {
    margin-bottom: 2vh;
  }

  .form-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    margin-right: 15px;
  }

  .form-label {
    margin-right: 10px;
    width: 40px;
  }

  .page {
    margin-top: 20px;
  }

  .select-count {
    font-weight: 600;
    color: #40a9ff;
  }

  .select-clear {
    margin-left: 10px;
  }

  .page {
    margin-top: 2vh;
  }

  .drop-down {
    margin-left: 5px;
  }
}

.icon01 {
  background: rgb(45, 154, 244);
  border-radius: 50%;
  padding: 3px
}

// 这是怕样式冲突前面加一个c
.cmr16 {
  margin-right: 16px
}

.cmr20 {
  margin-right: 20px
}

.cml-35 {
  margin-left: -35px
}

.label01 {
  position: absolute;
  top: -14px;
  left: 11px
}

.cmr10 {
  margin-right: 10px
}

.wrapper01 {
  position: absolute;
  right: 15px;
  display: inline-block
}

.wrappper02 {
  border-bottom: 1px solid #e9e9e9;
  padding-bottom: 6px;
  margin-bottom: 6px
}

.ch200 {
  height: 200px
}

.cheight {
  /deep/ .ivu-card-body {
    height: 100% !important;

    .calc-px-height {
      height: calc(100% - 150px)
    }

    // .ivu-table-body {
    //     height: 91%;
    // }


  }
}


.c-drawer01 {
  /deep/ .ivu-drawer {
    width: 1000px !important;
  }

  .cw110 {
    width: 110px;
  }

}

.c-drawer02 {
  /deep/ .ivu-drawer {
    width: 1000px !important;
  }

}

.crow {
  height: calc(100% - 40px);
  overflow-y: auto;
}


@media (max-width: 1920px) {
  /deep/ .ivu-table .ivu-table-fixed-right {
    height: 98% !important;

  }

  /deep/ .ivu-table .ivu-table-fixed-body {
    height: 91% !important;
    overflow-y: auto;
  }

  /deep/ .ivu-table-body {
    height: 91% !important;
  }
}

@media (min-width: 1921px) and (max-width: 3440px) {
  /deep/ .ivu-table .ivu-table-fixed-right {
    height: 98% !important;
  }

  /deep/ .ivu-table .ivu-table-fixed-body {
    height: 92.5% !important;
    overflow-y: auto;
  }

  /deep/ .ivu-table-body {
    height: 93% !important;
  }

}
// 重构样式
/deep/ .ivu-form-item-label{
    display: flex;
    justify-content: right;
    width: 240px !important;
}
/deep/ .ivu-form-item {
    width: 100%;
    margin-bottom: 0.1rem;
    margin-right: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/deep/ .ivu-form-item-content {
    width: 100% !important;
    margin-left: 0 ! important;
}
/deep/ .ivu-select {
    width: 100% !important;
}
/deep/ .ivu-date-picker {
    width: 100% !important;
}
/deep/ .br {
    margin-top: 15px;
    bottom: 0.12rem !important;
    .ivu-form-item-content {
        display: flex;
    }
}
/deep/ .ivu-input-type-textarea,/deep/ .ivu-input {
    height: calc(100% - 7px) !important;
}
.flex-1 {
    height: 100%;
}
/deep/ .ivu-drawer-body {
    overflow: hidden;
    .d-flex-align-center {
        height: fit-content !important;
        margin-left: 0 !important;
        justify-content: right;
        box-sizing: border-box;
        padding-right: 7px;
    }
}
.box-key {
    /deep/ .ivu-form-item-content {
        margin-left: 142px !important;
    }
}
.calc-sm-height {
    scrollbar-width: none;
}
</style>
